''' 子类的初始化函数调用父类的初始化函数'''

class A():
    def __init__(self,name):
        print('A')
        self.name = name

class B(A):
    def __init__(self,age,name):
        print('B')

        super().__init__(name)

        self.age = age


b = B(22,'珍妮')
print(b.age)
print(b.name)